<template>
  <div class="quite">
    <a href="javascript:;" @click="quite">退出</a>
  </div>
</template>

<script>
import { mapActions, } from 'vuex';
export default {
  name:'QuiteView',
  data(){
    return{

    }
  },
  methods:{
    ...mapActions(['userStore/clearUser']),
    quite(){
      this['userStore/clearUser']()
      .then(() => {
        this.$router.push('/login')
      })
      .catch(err => {
        console.log(err)
      })
    }
  }
}
</script>

<style lang="scss" scoped>
  .quite{
    height: 60px;
    line-height: 60px;
    text-align: center;
  }
  a{
    color: white;
    text-decoration: none;
  }
</style>